package com.tdkj.action.backstage.admin;

import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.tdkj.action.BaseAction;
import com.tdkj.model.information.BeanBaseInfo;
import com.tdkj.model.information.BeanInfoComment;
import com.tdkj.model.information.BeanInfoModule;
import com.tdkj.model.information.BeanModuleColumn;
import com.tdkj.model.user.BeanAdmin;
import com.tdkj.model.user.BeanAdminLevel;
import com.tdkj.model.user.BeanAdminLog;
import com.tdkj.model.user.BeanUser;
import com.tdkj.service.information.IBeanBaseInfoService;
import com.tdkj.service.information.IBeanInfoCommentService;
import com.tdkj.service.information.IBeanInfoModuleService;
import com.tdkj.service.user.IBeanAdminLevelService;
import com.tdkj.service.user.IBeanAdminService;
import com.tdkj.service.user.IBeanUserService;
import com.tdkj.util.PublicConfing;
import com.tdkj.util.md5.MD5Util;
import com.tdkj.util.typeconverter.TimestampTypeConverter;
import com.tdkj.util.typeconverter.TypeConvertException;

public class AdminMainAction extends BaseAction {
	private static final long serialVersionUID = -1567658750610254290L;
	private IBeanAdminService adminService;
	private IBeanAdminLevelService adminLevelService;
	private String adminname;
	private String adminpassword;
	private List<BeanAdmin> admins = new ArrayList<BeanAdmin>();

	private List<BeanAdminLevel> beanAdminLevels;
	private BeanAdmin beanAdmin;
	private String beanAdminLevelid;
	private String beanAdminid;

	private BeanAdmin loginAdmin;
	private String validateRandom;

	private String validatePassword;
	private String validatePassword2;

	// 查询条件
	private String queryFelid;
	private int queryType;

	private String[] ids;

	/**
	 * 退出
	 * 
	 * @return
	 */
	public String loginOut() {
		this.adminLogWrite("退出登录");
		ActionContext.getContext().getSession().put(PublicConfing.ADMINISTRATOR_ADMIN_OBJ_STRING_CONFIG, null);
		return getLogin();
	}

	/**
	 * 重置密码页面
	 * 
	 * @return
	 */
	public String resetPassword() {
		beanAdmin = this.getCurrentAdmin();
		if (null == beanAdmin) {
			return ADMIN_RELOGIN;
		}
		return "resetPassword";
	}

	public String validatePassword() {
		if (StringUtils.isEmpty(beanAdmin.getAdminname())) {
			this.addFieldError("userNameErrorVlidate", "用户名格式不正确");
			return "resetPassword";
		}
		if (StringUtils.isEmpty(beanAdmin.getAdminLoginName())) {
			this.addFieldError("userLoginNameErrorVlidate", "登录名格式不正确");
			return "resetPassword";
		}
		if (StringUtils.isEmpty(beanAdmin.getAdminpassword())) {
			this.addFieldError("userPasswordErrorVlidate", "密码格式不正确");
			return "resetPassword";
		}
		BeanAdmin admintemp = this.getCurrentAdmin();
		if (null == admintemp) {
			return ADMIN_RELOGIN;
		}
		if (!admintemp.getAdminpassword().equals(MD5Util.md5Encrypt(beanAdmin.getAdminpassword()))) {
			this.addFieldError("userPasswordErrorVlidate", "密码不正确,请重新输入");
			return "resetPassword";
		}

		if (StringUtils.isEmpty(validatePassword)) {
			this.addFieldError("userPassword1ErrorVlidate", "密码格式不正确");
			return "resetPassword";
		}
		if (StringUtils.isEmpty(validatePassword2)) {
			this.addFieldError("userPassword2ErrorVlidate", "密码格式不正确");
			return "resetPassword";
		}
		if (!validatePassword.equals(validatePassword2)) {
			this.addFieldError("userPassword2ErrorVlidate", "两次密码输入不正确，请重新输入");
			return "resetPassword";
		}
		/*
		 * if (adminLevelService.findByProperty("adminLoginName",
		 * beanAdmin.getAdminLoginName(), BeanAdmin.class).size() > 1) {
		 * this.addFieldError("userLoginNameErrorVlidate", "该用户已存在，请重新输入");
		 * return "resetPassword"; }
		 */
		admintemp = adminLevelService.findById(beanAdmin.getId(), BeanAdmin.class);
		admintemp.setAdminLoginName(beanAdmin.getAdminLoginName());
		admintemp.setAdminname(beanAdmin.getAdminname());
		admintemp.setAdminpassword(MD5Util.md5Encrypt(validatePassword));
		adminService.saveOrUpdate(admintemp, BeanAdmin.class);
		this.addFieldError("loginError", "密码修改成功，请重新登录");
		this.adminLogWrite("成功修改密码");
		return "loginSucess";
	}

	// 添加管理员
	public String addAdmin() {

		if (StringUtils.isEmpty(beanAdmin.getAdminname())) {
			this.addFieldError("userNameErrorVlidate", "用户名格式不正确");
			return validateResetPage();
		}
		if (StringUtils.isEmpty(beanAdmin.getAdminLoginName())) {
			this.addFieldError("userLoginNameErrorVlidate", "登录名格式不正确");
			return validateResetPage();
		}
		if (StringUtils.isEmpty(beanAdmin.getAdminpassword())) {
			this.addFieldError("userPasswordErrorVlidate", "密码格式不正确");
			return validateResetPage();
		}
		if (StringUtils.isEmpty(validatePassword)) {
			this.addFieldError("userPassword2ErrorVlidate", "密码格式不正确");
			return validateResetPage();
		}
		if (!validatePassword.equals(beanAdmin.getAdminpassword())) {
			this.addFieldError("userPassword2ErrorVlidate", "两次密码输入不正确，请重新输入");
			return validateResetPage();
		}
		if (beanAdminLevelid.equals("-1")) {
			this.addFieldError("beanAdminLevelidErrorVlidate", "请选择管理员级别");
			return validateResetPage();
		}
		if (adminLevelService.findByProperty("adminLoginName", beanAdmin.getAdminLoginName(), BeanAdmin.class).size() > 0) {
			this.addFieldError("userLoginNameErrorVlidate", "该用户已存在，请重新输入");
			return validateResetPage();
		}

		beanAdmin.setState("正常");
		BeanAdminLevel beanLevel = adminLevelService.findById(Long.parseLong(beanAdminLevelid), BeanAdminLevel.class);
		beanAdmin.setAdminLevel(beanLevel);
		beanAdmin.setAdminpassword(MD5Util.md5Encrypt(beanAdmin.getAdminpassword()));
		adminService.saveOrUpdate(beanAdmin, BeanAdmin.class);
		this.adminLogWrite("添加一名管理员  名称：" + beanAdmin.getAdminname() + " 登录名：" + beanAdmin.getAdminLoginName());
		return findAll();
	}

	private String validateResetPage() {
		beanAdminLevels = this.adminLevelService.findAll(BeanAdminLevel.class);
		return "addPage";
	}

	/**
	 * 管理员修改页面
	 * 
	 * @return
	 */
	public String modifyAdmin() {
		beanAdminLevels = this.adminLevelService.findAll(BeanAdminLevel.class);
		beanAdmin = adminService.findById(Long.parseLong(beanAdminid), BeanAdmin.class);
		if (null != beanAdmin.getAdminLevel()) {
			beanAdminLevelid = beanAdmin.getAdminLevel().getId() + "";
		}
		beanAdmin.setAdminpassword("");
		return "addPage";
	}

	public String deleteAdmin() {
		if (null != beanAdmin) {
			BeanAdmin beanAdminTemp = this.getBaseService().findById(Long.parseLong(beanAdminid), BeanAdmin.class);
			beanAdminTemp.setBeanState(1);
			this.getBaseService().saveOrUpdate(beanAdminTemp, BeanAdmin.class);
			this.adminLogWrite("删除一名管理员  名称：" + beanAdminTemp.getAdminname() + " 登录名：" + beanAdminTemp.getAdminLoginName());

		}
		return findAll();
	}

	/**
	 * 冻结管理员
	 * 
	 * @return
	 */
	public String djAdmin() {
		beanAdmin = adminService.findById(Long.parseLong(beanAdminid), BeanAdmin.class);
		if (null != beanAdmin) {
			beanAdmin.setState("冻结");
			adminService.saveOrUpdate(beanAdmin, BeanAdmin.class);
			this.adminLogWrite("冻结一名管理员  名称：" + beanAdmin.getAdminname() + " 登录名：" + beanAdmin.getAdminLoginName());
		}
		return findAll();

	}

	/**
	 * 解除冻结为正常
	 * 
	 * @return
	 */
	public String zcAdmin() {
		beanAdmin = adminService.findById(Long.parseLong(beanAdminid), BeanAdmin.class);
		if (null != beanAdmin) {
			beanAdmin.setState("正常");
			adminService.saveOrUpdate(beanAdmin, BeanAdmin.class);
			this.adminLogWrite("解除冻结管理员  名称：" + beanAdmin.getAdminname() + " 登录名：" + beanAdmin.getAdminLoginName());
		}
		return findAll();

	}

	// 进入管理员编辑界面
	public String getEditPage() {
		return "editPage";
	}

	// 进入管理员添加界面
	public String getAddPage() {
		beanAdminLevels = this.adminLevelService.findAll(BeanAdminLevel.class);
		beanAdmin = new BeanAdmin();
		return "addPage";
	}

	/**
	 * 获取管理员列表
	 * 
	 * @return
	 */
	public String findAll() {
		Criteria criteria = this.createCriteria(BeanAdmin.class);
		criteria.add(Restrictions.eq("beanState", 0));
		criteria.addOrder(Order.desc("state"));// 对状态进行排序
		if (queryType == 1) {
			if (StringUtils.isNotEmpty(queryFelid)) {
				criteria.add(Restrictions.like("adminname", queryFelid));
			}
		} else if (queryType == 2) {

		} else if (queryType == 3) {
			if (StringUtils.isNotEmpty(queryFelid)) {
				criteria.add(Restrictions.like("state", queryFelid));
			}
		} else if (queryType == 4) {

		}

		this.queryByPage(criteria, "adminMainAction!findAll.action", 10);
		// this.adminLogWrite("查询管理员列表");
		return "findAll";
	}

	// 获取登录界面
	public String getLogin() {
		if (null == beanAdmin) {
			beanAdmin = new BeanAdmin();
		}
		// exchangeRateService.updateGold(1L, value);
		// initSuperAndmin();
		// return "login";
		return Action.LOGIN;
	}

	// 管理员登录校验
	public String validateAdmin() {
		if (StringUtils.isEmpty(beanAdmin.getAdminLoginName())) {
			this.addFieldError("userNameError", "用户名格式不正确");
			return getLogin();
		}
		if (StringUtils.isEmpty(beanAdmin.getAdminpassword())) {
			this.addFieldError("userPasswordError", "密码格式不正确");
			return getLogin();
		}

		// 验证码不正确
		String cv = (String) ActionContext.getContext().getSession().get(PublicConfing.MEMBER_LOGIN_RANDOM);
		if ("".equals(validateRandom) || !validateRandom.equals(cv)) {
			this.addFieldError("validateRandom", "验证码不正确,请重新输入");
			return getLogin();
		}
		List<BeanAdmin> list = adminLevelService.findByProperty("adminLoginName", beanAdmin.getAdminLoginName(), BeanAdmin.class);
		String md5Password = MD5Util.md5Encrypt(beanAdmin.getAdminpassword());
		for (BeanAdmin beanAdminTemp : list) {
			if (beanAdminTemp.getAdminpassword().equals(md5Password)) {
				if (!"正常".equals(beanAdminTemp.getState())) {
					this.addFieldError("loginError", "该用户已锁定，请联系管理员");
					this.adminLogWrite("管理员："+beanAdminTemp.getAdminname() +"登录，已锁定登录不成功");
					return getLogin();
				} else if (beanAdminTemp.getBeanState() == 1) {
					this.adminLogWrite("管理员："+beanAdminTemp.getAdminname() +"登录，已删除登录不成功");
					this.addFieldError("loginError", "该用户已被管理员删除，请联系管理员");					
					return getLogin();
				} else {
					// permission =
					// beanAdminTemp.getAdminLevel().getPermission();
					// beanAdmin.setLogintime(new
					// Timestamp(System.currentTimeMillis()));
					// adminService.saveOrUpdate(beanAdmin, BeanAdmin.class);
					// adminService.merge(beanAdmin);
					ActionContext.getContext().getSession().put(PublicConfing.ADMINISTRATOR_ADMIN_OBJ_STRING_CONFIG, beanAdminTemp);
					beanAdmin = beanAdminTemp;
					// 重定向
					if (null != ActionContext.getContext().getSession().get(PublicConfing.REDIRECTURL_TEMP)) {
						String url = (String) ActionContext.getContext().getSession().get(PublicConfing.REDIRECTURL_TEMP);
						// System.out.println("登录得到地址：" + url);
						HttpServletResponse response = ServletActionContext.getResponse();
						try {
							ActionContext.getContext().getSession().put(PublicConfing.REDIRECTURL_TEMP, null);
							response.sendRedirect(url);
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						return null;
					}
					this.adminLogWrite("管理员后台登录");
					return "index";
				}
			}
		}
		this.addFieldError("loginError", "用户名或密码不正确,请重新输入");
		return getLogin();
	}

	public String deleteAll() {
		if (null != ids) {
			for (String idtemp : ids) {
				BeanAdmin beanAdminTemp = this.getBaseService().findById(Long.parseLong(idtemp), BeanAdmin.class);
				beanAdminTemp.setBeanState(1);
				this.getBaseService().saveOrUpdate(beanAdminTemp, BeanAdmin.class);
				this.adminLogWrite("删除一名管理员  名称：" + beanAdminTemp.getAdminname() + " 登录名：" + beanAdminTemp.getAdminLoginName());
			}
		}
		return findAll();
	}

	public List<BeanAdminLevel> getBeanAdminLevels() {
		return beanAdminLevels;
	}

	public void setBeanAdminLevels(List<BeanAdminLevel> beanAdminLevels) {
		this.beanAdminLevels = beanAdminLevels;
	}

	public BeanAdmin getBeanAdmin() {
		return beanAdmin;
	}

	public void setBeanAdmin(BeanAdmin beanAdmin) {
		this.beanAdmin = beanAdmin;
	}

	public String getBeanAdminLevelid() {
		return beanAdminLevelid;
	}

	public void setBeanAdminLevelid(String beanAdminLevelid) {
		this.beanAdminLevelid = beanAdminLevelid;
	}

	public String getBeanAdminid() {
		return beanAdminid;
	}

	public void setBeanAdminid(String beanAdminid) {
		this.beanAdminid = beanAdminid;
	}

	public BeanAdmin getLoginAdmin() {
		return loginAdmin;
	}

	public void setLoginAdmin(BeanAdmin loginAdmin) {
		this.loginAdmin = loginAdmin;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	/**
	 * 初始化超级管理员
	 */
	@SuppressWarnings("unchecked")
	private void initSuperAndmin() {
		/*
		 * if (adminService.findByProperty("superAdmin", 1,
		 * BeanAdmin.class).size() > 0) { return; }
		 * 
		 * BeanPermission beanPermission = new BeanPermission();
		 * beanPermission.setGmp1(true);// 管理员管理 beanPermission.setGmp2(true);//
		 * 管理员注册 beanPermission.setGmp3(true);// 管理员级别管理
		 * beanPermission.setGmp4(true);// 管理员权限分配
		 * beanPermission.setGmp5(true);// 管理员操作日志
		 * beanPermission.setGmp6(true);// 管理员放银币
		 * 
		 * // --------用户管理--um--------------- beanPermission.setNmp1(true);//
		 * 网站用户管理 beanPermission.setNmp2(true);// 网站用户级别管理
		 * beanPermission.setNmp3(true);// 网站用户经验值管理
		 * beanPermission.setNmp4(true);// 用户相册管理
		 * 
		 * // ---------信息管理--im--------------- beanPermission.setImp1(true);//
		 * 信息板块管理 beanPermission.setImp2(true);// 发布信息
		 * beanPermission.setImp3(true);// 信息管理 beanPermission.setImp4(true);//
		 * 信息审核设置 beanPermission.setImp5(true);// 货品类别管理
		 * beanPermission.setImp6(true);// 期货行情管理
		 * beanPermission.setImp7(true);// 现货行情管理
		 * beanPermission.setImp8(true);// 矿业资源管理
		 * beanPermission.setImp9(true);// 矿业资源发布
		 * beanPermission.setImp10(true);// 专家管理
		 * beanPermission.setImp11(true);// 店铺空间模块信息管理
		 * beanPermission.setImp12(true);// 店铺留言管理
		 * beanPermission.setImp13(true);// 空间留言管理
		 * beanPermission.setImp14(true);// 发布站内信
		 * 
		 * // ---------商城管理--sm------------- beanPermission.setSmp1(true);//
		 * 供求分类管理 beanPermission.setSmp2(true);// 商品分类管理
		 * beanPermission.setSmp3(true);// 商品管理 beanPermission.setSmp4(true);//
		 * 订单管理 beanPermission.setSmp5(true);// 评价管理
		 * beanPermission.setSmp6(true);// 店铺货架设置
		 * beanPermission.setSmp7(true);// 信用等级管理
		 * beanPermission.setSmp8(true);// 信用等级评价积分
		 * beanPermission.setSmp9(true);// 店铺管理 beanPermission.setSmp10(true);//
		 * 旺铺推荐管理 beanPermission.setSmp11(true);// 旺铺推荐设置
		 * beanPermission.setSmp12(true);// 橱窗推荐设置
		 * beanPermission.setSmp13(true);// 求购管理
		 * beanPermission.setSmp14(true);// 商城公告管理
		 * beanPermission.setSmp15(true);// 发布商城公告
		 * 
		 * // ---------网站管理--wm------------- beanPermission.setWmp1(true);//
		 * 参数设置 beanPermission.setWmp2(true);// 网站公告管理
		 * beanPermission.setWmp3(true);// 关键字过滤 beanPermission.setWmp4(true);//
		 * 区域管理 beanPermission.setWmp5(true);// 投诉管理
		 * beanPermission.setWmp6(true);// 协议管理 beanPermission.setWmp7(true);//
		 * 签署协议明细
		 * 
		 * // ---------增值管理--zm------------- beanPermission.setZmp1(true);//
		 * 竞价加价幅度 beanPermission.setZmp2(true);// 商城首页商品广告位竞价管理
		 * beanPermission.setZmp3(true);// 网站首页商品分类竞价管理
		 * beanPermission.setZmp4(true);// 信息竞价位管理
		 * beanPermission.setZmp5(true);// 信息竞价位竞价明细
		 * beanPermission.setZmp6(true);// 广告位竞价/免费/保留管理
		 * beanPermission.setZmp7(true);// 广告位竞价明细
		 * beanPermission.setZmp8(true);// 广告审核 beanPermission.setZmp9(true);//
		 * 飘彩管理 beanPermission.setZmp10(true);// 短信订阅管理
		 * beanPermission.setZmp11(true);// 短信订阅板块管理
		 * beanPermission.setZmp12(true);// 行情指导收费设置
		 * beanPermission.setZmp13(true);// 行情指导收费用户管理
		 * 
		 * // ---------统计管理--cm------------- beanPermission.setCm1(true);//
		 * 网站/页面流量统计 beanPermission.setCm2(true);// 商品交易统计
		 * beanPermission.setCm3(true);// 商品交易量排名统计
		 * beanPermission.setCm4(true);// 网站消费统计 beanPermission.setCm5(true);//
		 * 会员充值统计 beanPermission.setCm6(true);// 转账统计
		 * beanPermission.setCm7(true);// 金、银币交易统计
		 * beanPermission.setCm8(true);// 会员虚拟币统计 beanPermission.setCm9(true);//
		 * 兑换统计 beanPermission.setCm10(true);// 放出银币量统计
		 * beanPermission.setCm11(true);// 站内虚拟币统计
		 * beanPermission.setCm12(true);// 信息统计 beanPermission.setCm13(true);//
		 * 黄页统计 beanPermission.setCm14(true);// 黄、紫钻人数统计
		 * beanPermission.setCm15(true);// 会员活跃度统计
		 * beanPermission.setCm16(true);// 会员等级统计
		 * 
		 * // ---------装扮管理-bm------------- beanPermission.setBmp1(true);//
		 * 装扮类型管理 beanPermission.setBmp2(true);// 装扮内容管理
		 * beanPermission.setBmp3(true);// 自定义模块价格设置
		 * beanPermission.setBmp4(true);// 背景自定义管理
		 * beanPermission.setBmp5(true);// 背景自定义图片审核
		 * beanPermission.setBmp6(true);// 店铺空间风格管理
		 * beanPermission.setBmp7(true);// 空间黄钻管理
		 * beanPermission.setBmp8(true);// 店铺紫钻管理
		 * 
		 * // ---------黄页管理-hm------------- beanPermission.setHmp1(true);// 添加企业
		 * beanPermission.setHmp2(true);// 企业管理
		 * 
		 * // ---------友情链接-ym------------- beanPermission.setYmp1(true);//
		 * 友情链接管理
		 * 
		 * // ---------自助广告-pm------------- beanPermission.setPmp1(true);//
		 * 文字广告管理 beanPermission.setPmp2(true);// 图片广告管理
		 * 
		 * // ---------汇率管理-lm------------- beanPermission.setLmp1(true);//
		 * 积分兑银币汇率管理 beanPermission.setLmp2(true);// 人民币兑金币汇率管理
		 * beanPermission.setLmp3(true);// 银币折扣管理
		 * this.adminLevelService.save(beanPermission);
		 * 
		 * BeanAdminLevel bean = new BeanAdminLevel();
		 * bean.setLevelname("超级管理员级别"); bean.setLevelcode("0000");
		 * bean.setRemark("系统自动生成超级管理员级别"); adminService.save(bean);
		 * 
		 * BeanAdmin beanAdmin = new BeanAdmin();
		 * beanAdmin.setAdminname("超级管理员");
		 * beanAdmin.setAdminLoginName("admin");
		 * beanAdmin.setAdminpassword(MD5Util.md5Encrypt("admin"));
		 * beanAdmin.setRemark("系统自动生成超级管理员"); beanAdmin.setState("正常");
		 * beanAdmin.setSuperAdmin(1); adminService.save(beanAdmin);
		 * 
		 * // ----------- bean.setPermission(beanPermission);
		 * adminService.saveOrUpdate(bean, BeanAdminLevel.class);
		 * 
		 * beanAdmin.setAdminLevel(bean); adminService.saveOrUpdate(beanAdmin,
		 * BeanAdmin.class);
		 * 
		 * Set admins = new HashSet<BeanAdmin>(); admins.add(beanAdmin);
		 * bean.setAdmins(admins); adminService.saveOrUpdate(bean,
		 * BeanAdminLevel.class);
		 */

		/*
		 * Set admins = new HashSet<BeanAdmin>(); admins.add(beanAdmin);
		 * bean.setPermission(beanPermission);
		 * adminLevelService.save(beanPermission);
		 * 
		 * beanAdmin.setAdminLevel(bean); adminService.merge(beanAdmin);
		 */
	}

	public String getValidateRandom() {
		return validateRandom;
	}

	public void setValidateRandom(String validateRandom) {
		this.validateRandom = validateRandom;
	}

	public String getValidatePassword() {
		return validatePassword;
	}

	public void setValidatePassword(String validatePassword) {
		this.validatePassword = validatePassword;
	}

	public String getValidatePassword2() {
		return validatePassword2;
	}

	public void setValidatePassword2(String validatePassword2) {
		this.validatePassword2 = validatePassword2;
	}

	public List<BeanAdmin> getAdmins() {
		return admins;
	}

	public void setAdmins(List<BeanAdmin> admins) {
		this.admins = admins;
	}

	public IBeanAdminService getAdminService() {
		return adminService;
	}

	public String getAdminname() {
		return adminname;
	}

	public void setAdminname(String adminname) {
		this.adminname = adminname;
	}

	public String getAdminpassword() {
		return adminpassword;
	}

	public void setAdminpassword(String adminpassword) {
		this.adminpassword = adminpassword;
	}

	@Resource
	public void setAdminService(IBeanAdminService adminService) {
		this.adminService = adminService;
	}

	public IBeanAdminLevelService getAdminLevelService() {
		return adminLevelService;
	}

	@Resource
	public void setAdminLevelService(IBeanAdminLevelService adminLevelService) {
		this.adminLevelService = adminLevelService;
	}

	public String getQueryFelid() {
		return queryFelid;
	}

	public void setQueryFelid(String queryFelid) {
		this.queryFelid = queryFelid;
	}

	public int getQueryType() {
		return queryType;
	}

	public void setQueryType(int queryType) {
		this.queryType = queryType;
	}

	public String[] getIds() {
		return ids;
	}

	public void setIds(String[] ids) {
		this.ids = ids;
	}

}
